package com.zhl.study.service.impl;

import com.alibaba.fastjson.JSON;
import com.zhl.study.service.Decoder;

/**
 * @description 基于json的反序列化
 * @Author: z156940l@outlook.com
 * @className JSONDecoder
 * @Date: 2024/5/20 10:15
 */
public class JSONDecoder implements Decoder {
    @Override
    public <T> T decode(byte[] bytes, Class<T> clazz) {
        return JSON.parseObject(bytes,clazz);
    }
}
